package com.example.produces.service.impl;

import com.example.produces.entity.Fwarehouse;
import com.example.produces.mapper.FwarehouseMapper;
import com.example.produces.service.FwarehouseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
@Service
@Transactional
public class FwarehouseImpl implements FwarehouseService {
    @Autowired
    private FwarehouseMapper fwarehouseMapper;

    @Override
    public List<Fwarehouse> findAll() {
        List<Fwarehouse> fwarehouses=fwarehouseMapper.findAll();
        return fwarehouses;
    }

    @Override
    public void add(Fwarehouse fwarehouse) {
             fwarehouseMapper.add(fwarehouse);
    }

    @Override
    public Fwarehouse findOne(String designation) {
        return fwarehouseMapper.findOne(designation);
    }

    @Override
    public void upDate(Fwarehouse fwarehouse) {
         fwarehouseMapper.upDate(fwarehouse);
    }

    @Override
    public void delete(String designation) {
                  fwarehouseMapper.delete(designation);
    }
}
